home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4147 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: void main() and other atrocities!
  5. Date: 1 Feb 1996 15:52:02 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4erjn2INN38b@keats.ugrad.cs.ubc.ca>
  8. References: <4eduaj$1aq@grouper.Exis.Net> <4em17r$shq@jaxnet.jaxnet.com> <4emub9$1mo@fountain.mindlink.net> <4epplj$egf@host-3.cyberhighway.net>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4epplj$egf@host-3.cyberhighway.net>,
  12.  <mjellis@cyberhighway.net> wrote:
  13.  >Hey...ease up buddy.  I'm one of those idiots that made such a post 'void main()' and a nice gentlemen sent me an email informing me of the ANSI standard regarding this.
  14.  >
  15.  >Because of this nice gentlemen's information, now I know better.  And, he didn't scare me off this newsgroup be blowing my head off with a cannon!  Email works wonders and it's *so* much more courteous.
  16.  
  17. There is nothing with 'void main()'. It's not giverned by the ANSI standard,
  18. first of all, because that is not an ANSI definition. An ANSI definiton would
  19. be more like 'void main(void)'.
  20.  
  21. You don't need main() to be defined has having any sort of return value unless
  22. you plan to "return" out of it. If you use exit(0) like me, declaring the
  23. function void is ok, since your function never returns.
  24.  
  25. The antsy standard is _great_ for assuring me that my bike helmet is safe, mind
  26. you.
  27. -- 
  28.  
  29.